home *** CD-ROM | disk | FTP | other *** search
/ The Trig Explorer / The Trig Explorer.iso / mac / Explorer / SOUND.dxr / 00161.ls < prev    next >
Encoding:
Text File  |  1998-07-22  |  886 b   |  26 lines

  1. on mouseDown me
  2.   set the cursor of sprite the spriteNum of me to [member "Closed Hand", member "Closed Hand Mask"]
  3.   repeat while the stillDown
  4.     if (the mouseV < 427) and (the mouseV > 262) then
  5.       set the locV of sprite 7 to the mouseV
  6.       set v1 to the mouseV - 258
  7.       set v1 to 7 - (v1 / 23)
  8.       set the soundLevel to v1
  9.       put v1 into field "amplitude"
  10.       set DV to 18 * v1
  11.       spriteBox(3, the left of sprite 3, the locV of sprite 1 + DV - 2, the right of sprite 3, the locV of sprite 1 - DV - 2)
  12.       puppetSound(field "frequency" & ".aif")
  13.       updateStage()
  14.     end if
  15.   end repeat
  16.   set the cursor of sprite the spriteNum of me to [member "Hand", member "Hand Mask"]
  17. end
  18.  
  19. on beginSprite me
  20.   set the cursor of sprite the spriteNum of me to [member "Hand", member "Hand Mask"]
  21. end
  22.  
  23. on endSprite me
  24.   set the cursor of sprite the spriteNum of me to 0
  25. end
  26.